/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Comic Sans MS", cursive, sans-serif;
}

body {
  background-color: #f5e6ca;
  background-image: url("assets/background.png");
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

.container {
  max-width: 800px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: 4px solid #ff9d00;
}

.game-header {
  text-align: center;
  margin-bottom: 20px;
}

h1 {
  color: #ff6b6b;
  font-size: 3rem;
  text-shadow: 2px 2px 0 #ffd166, 4px 4px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

h2 {
  color: #06d6a0;
  font-size: 2rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 0 #118ab2;
}

.score-board {
  display: flex;
  justify-content: space-between;
  background-color: #ffe66d;
  border-radius: 15px;
  padding: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #073b4c;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 游戏屏幕样式 */
#game-container {
  position: relative;
  width: 100%;
  height: 500px;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.screen.active {
  display: flex;
}

/* 游戏画布样式 */
#game-canvas {
  background-color: #f0f0f0;
  border: 3px solid #118ab2;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 级别选择按钮 */
.level-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.level-group {
  display: flex;
  gap: 8px;
}

.level-btn {
  padding: 10px;
  font-size: 1rem;
  background-color: #06d6a0;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.level-btn:hover {
  transform: scale(1.1);
  background-color: #04c1a3;
}

.level-btn.active {
  background-color: #ff6b6b;
  transform: scale(1.1);
}

/* 操作按钮 */
.action-btn {
  padding: 12px 24px;
  font-size: 1.2rem;
  background-color: #ff9d00;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin: 10px;
}

.action-btn:hover {
  transform: scale(1.05);
  background-color: #ff8800;
}

.controls {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.instructions {
  margin: 15px 0;
  line-height: 1.6;
  color: #118ab2;
  font-weight: bold;
}

.final-score {
  font-size: 1.5rem;
  color: #073b4c;
  margin: 20px 0;
  font-weight: bold;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .level-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  #game-canvas {
    width: 100%;
    height: auto;
  }
}
